package cn.hou.java.designpattern._05decorator;

//具体装饰器类
public class FlyCarDecorator extends CarDecorator {
	
	public FlyCarDecorator(Car car) {
		super(car);//继承父类的car属性
	}

	@Override
	public void show() {
		this.car.show();//保留原本的功能
		this.fly();//添加装饰功能
	}

	public void fly(){
		System.out.println("可以飞");
	}
}
